Get trades
GET/bot-gateway-service/api/v3/myTrades
Get trades for a specific account and symbol based on the provided filters.
- If
fromId
is set, it will get id >= thatfromId
. Otherwise, most recent orders are returned. - The time between startTime and endTime can't be longer than 24 hours.
- If
startTime
and/orendTime
are provided, thenorderId
is not required.
Request
Query Parameters
- If orderId is set, it will get trades for the specified orderId, Otherwise most recent orders are returned.
- UTC timestamp in ms.
- The time between startTime and endTime can't be longer than 24 hours.
- UTC timestamp in ms.
- The time between startTime and endTime can't be longer than 24 hours.
- Default gets most recent trades.
- Default 500; max 1000.
- RecvWindow is optional.
- The value cannot be greater than 60000.
- If recvWindow is not sent, it defaults to 5000.
Symbol of the trading pair (e.g., XCBETH) (optional).
The unique identifier of the order
of type big integer generated by the Ping Exchange (optional).
The creation time of the trades should be greater than or equal StartTime (optional).
The creation time of the trades should be less than or equal EndTime (optional).
Trade id to fetch from (optional).
Maximum number of trades requested (optional).
The number of milliseconds after timestamp the request is valid for (optional).
Responses
- 200
- 401
Success
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
- Unless OCO, value will be -1
]
Symbol of the trading pair (e.g., BTCUSDC).
The unique identifier of the trade.
The unique identifier of the order associated with the trade.
The unique identifier of the order list associated with the trade.
The price at which the trade occurred.
The quantity of the asset traded.
The quote quantity of the trade.
The commission paid for the trade.
The asset used for paying the commission.
The timestamp of the trade.
Indicates if the trade was initiated by the buyer.
Indicates if the trade maker was the buyer.
Indicates if this trade is the best match.
[
{
"symbol": "BTCUSDC",
"id": 123456,
"orderId": 7890,
"orderListId": -1,
"price": "50000",
"qty": "1.5",
"quoteQty": "75000.0",
"commission": "0.1",
"commissionAsset": "BTC",
"time": 1643678921,
"isBuyer": true,
"isMaker": false,
"isBestMatch": true
}
]
[
{
"symbol": "BTCUSDC",
"id": 123456,
"orderId": 7890,
"orderListId": -1,
"price": "50000",
"qty": "1.5",
"quoteQty": "75000",
"commission": "0.1",
"commissionAsset": "BTC",
"time": 1643678921,
"isBuyer": true,
"isMaker": false,
"isBestMatch": true
},
{
"symbol": "XCBETH",
"id": 123227,
"orderId": 8522,
"orderListId": -1,
"price": "27000",
"qty": "0.12",
"quoteQty": "25000",
"commission": "0.5",
"commissionAsset": "ETH",
"time": 1695216591,
"isBuyer": false,
"isMaker": true,
"isBestMatch": true
}
]
Unauthorized